package com.lz.androidlibraries.fragment;

import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.liuyk.commonlib.fragment.BaseFragment;
import com.liuyk.commonlib.router.RouterManager;
import com.lz.androidlibraries.R;
import com.lz.androidlibraries.activity.TestActivity;

/**
 * Desc
 * <p>
 * Created by liuyakui on 2020/11/20.
 */
public class MainFragment extends BaseFragment {

    @Override
    protected void createView() {
        findViewById(R.id.js_bridge).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                RouterManager.getInstance()
                        .builder("file:///android_asset/provision.html?title=&hideheader=0")
                        .jump();
            }
        });
        findViewById(R.id.test).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), TestActivity.class));
            }
        });

    }

    @Override
    protected View getContentView(LayoutInflater inflater, ViewGroup container) {
        return inflater.inflate(R.layout.fragment_main, container, false);
    }
}